<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
/*------------- Token相关接口 -------------*/
//token相关接口
Route::post('api/:version/token/user','api/:version.Token/getToken');
Route::post('api/:version/token/verify','api/:version.Token/verifyToken');
Route::post('api/:version/token/app','api/:version.Token/getAppToken');
Route::post('api/:version/token/enterprise','api/:version.Token/getEnterpriseToken');
Route::post('api/:version/token/boss','api/:version.Token/getBossToken');
Route::post('api/:version/token/app_token','api/:version.Token/getAppTokenById');
/**-------------  资源文件上传接口 ----------------**/
Route::get('api/:version/token/file/:type','api/:version.File/getUploadToken');//获取第三方云存储资源上传标识
Route::any('api/:version/file/receive','api/:version.File/getCallbackInfo');//第三方云存储上传结果通知回调接口
Route::any('api/:version/file/persistent','api/:version.File/getPersistentCallbackInfo');//第三方云存储上传数据处理结果通知回调接口
Route::delete('api/:version/file/delete','api/:version.File/deleteImg');//删除第三方云存储上的图片
/**--------- 小程序相关路由 ----------**/
Route::get('api/:version/appinfo','api/:version.ThirdApp/getAppInfo');//获取小程序设置信息
Route::get('api/:version/mallinfo','api/:version.Mall/getBackInfo');//获取商城设置信息
Route::get('api/:version/banner/:id','api/:version.Banner/getBanner');
Route::get('api/:version/theme','api/:version.Theme/getSimpleList');
Route::get('api/:version/theme/:id','api/:version.Theme/getComplexOne');
//产品相关路由
Route::group('api/:version/product',function (){
    Route::get('/recent','api/:version.Product/getRecent');
    Route::post('/by_category','api/:version.Product/getAllInCategory');
    Route::get('/:id','api/:version.Product/getOne',[],['id'=>'\d+']);
});
Route::post('api/:version/product/qrcode','api/:version.Product/getProductQRCode');//获取商品码
//商品分类
Route::get('api/:version/category/all/:wu_id','api/:version.Category/getAllCategory');
//购物券接口
Route::get('api/:version/coupon/list/:wu_id','api/:version.Coupon/getList');//获取所有购物券列表
Route::post('api/:version/coupon/product','api/:version.Coupon/getListByProduct');//获取某个商品下的优惠卷
Route::post('api/:version/coupon/user','api/:version.Coupon/getUserCoupon');//查询用户的优惠卷
Route::post('api/:version/coupon/code','api/:version.Coupon/getCode');//领取优惠卷
Route::get('api/:version/coupon/detail/:c_id','api/:version.Coupon/getCouponDetail',[],['c_id'=>'\d+']);//获取优惠卷详情
//用户地址
Route::post('api/:version/address','api/:version.Address/createOrUpdateAddress');
Route::post('api/:version/address/user','api/:version.Address/getUserAddress');
//聊天信息接口
Route::get('api/:version/user/message/:wu_id','api/:version.Message/getCacheMessageByUser');//聊天用户接口
Route::post('api/:version/message/list/user','api/:version.Message/getMessageListByUser');//聊天列表
Route::get('api/:version/message/status/:wu_id','api/:version.Message/changeMessageStatusByUser');//小程序用户消息状态改变
Route::get('api/:version/message/work/status/:wu_id','api/:version.Message/changeMessageStatusByWorkUser');//CRM用户消息状态改变
//订单相关接口
Route::post('api/:version/order','api/:version.Order/palaceOrder');//下订单
Route::post('api/:version/order/:id','api/:version.Order/getOrderDetail',[],['id'=>'\d+']);//获取订单详情
Route::post('api/:version/order/cancel/:id','api/:version.Order/cancelOrder',[],['id'=>'\d+']);//取消订单
Route::post('api/:version/order/confirm/:id','api/:version.Order/confirmOrder',[],['id'=>'\d+']);//确认到货
Route::post('api/:version/order/by_user','api/:version.Order/getSummaryByUser');//用户订单接口
Route::post('api/:version/order/by_class','api/:version.Order/getSummaryByClass');//订单分类接口
//支付相关接口
Route::post('api/:version/pay/pre_order','api/:version.Pay/getPreOrder');
Route::post('api/:version/pay/notify','api/:version.Pay/receiveNotify');
Route::post('api/:version/pay/pre_order2','api/:version.Pay/getOtherOrder');
Route::post('api/:version/pay/notify2','api/:version.Pay/receiveNotify2');
//名片相关接口
Route::post('api/:version/card/father','api/:version.Card/createFather');//创建用户父级
Route::post('api/:version/card/update','api/:version.Card/updateUserInfo');//更新成员信息
Route::post('api/:version/card/authorization','api/:version.Card/userAuthorization');//用户授权
Route::post('api/:version/card/empower','api/:version.Card/userEmpowerment');//用户授权
Route::get('api/:version/card','api/:version.Card/getCardList');//获取当前用户的所有名片列表
Route::get('api/:version/card/:wu_id','api/:version.Card/getCard');//获取当前用户的名片基本信息
Route::get('api/:version/card/browse/:wu_id','api/:version.Card/getBrowseList');//获取名片最近浏览记录
Route::get('api/:version/card/thumbs/:wu_id','api/:version.Card/getThumsUpNum');//获取用户点赞量
Route::get('api/:version/card/extend/:wu_id','api/:version.Card/getCardExtend');//获取当前用户的名片拓展信息
Route::get('api/:version/card/tag/list/:wu_id','api/:version.Card/getTagNum');//获取标签点赞量
Route::get('api/:version/card/shareword/:wu_id','api/:version.Card/getShareWord');//获取分享语设置
Route::get('api/:version/card/product/:wu_id','api/:version.Card/getCardProduct');//获取推荐商品
Route::get('api/:version/card/tag/:id','api/:version.Card/tagClick',[],['id'=>'\d+']);//个性标签点赞

Route::get('api/:version/card/qrcode/:w_id','api/:version.Card/getQRCodeByWuId',[],['w_id'=>'\d+']);//获取用户二维码
Route::post('api/:version/card/phone','api/:version.Card/getPhone');//获取电话
Route::get('api/:version/card/thumbs_up/:wu_id','api/:version.Behavior/getThumbsUp');//用户点赞
Route::post('api/:version/card/behavior','api/:version.Behavior/getBehavior');//名片行为抓取
Route::get('api/:version/user','api/:version.User/getUserDetails');//用户详情
Route::post('api/:version/user/phone','api/:version.User/checkAuthPhone');//检查用户是否授权手机号
Route::post('api/:version/user/formid','api/:version.Message/createFormId');//获取formid

Route::get('api/:version/poster/:id','api/:version.Poster/getPosterInfo',[],['id'=>'\d+']);//海报详情
//官网相关接口
Route::get('api/:version/web/info','api/:version.Web/getWebInfo');//获取名品信息
Route::get('api/:version/web/subweb','api/:version.web/getConsulting');//获取子页面信息

//服务相关接口
Route::post('api/:version/subject/type','api/:version.subject/getType');//获取题目分类
Route::post('api/:version/subject/course','api/:version.subject/SubjectExercises');//获取练习题目
Route::post('api/:version/subject/judge','api/:version.Subject/SubjectJudgment'); //题目对错判断;
Route::get('api/:version/subject/wrong/:course/:car_status','api/:version.subject/SubjectWrongExercises',[],['course'=>'\d+','car_status'=>'\d+']);//获取用户错误的题
Route::post('api/:version/subject/chapter','api/:version.subject/SubjectChapter');//题目分类练习
Route::post('api/:version/subject/sort','api/:version.subject/SubjectSort');//分类练习
Route::post('api/:version/subject/random','api/:version.subject/SubjectRandom');//随机练习
Route::post('api/:version/subject/refer','api/:version.subject/SubjectReferWrong');//提交错题
Route::post('api/:version/subject/correctness','api/:version.subject/SubjectCorrectness');//正确率
Route::post('api/:version/subject/number','api/:version.subject/SubjectNumber');//上次随机练习的题目
Route::get('api/:version/subject/errors/:false_id','api/:version.subject/DeleteSubjectError',[],['false_id'=>'\d+']);//删除错题
Route::post('api/:version/test/exam','api/:version.test/getCourse');//模拟考试
Route::post('api/:version/test/log','api/:version.test/inserLog');//添加考试记录
Route::get('api/:version/test/error/:course/:car_status','api/:version.test/getError',[],['course'=>'\d+','car_status'=>'\d+']);//获取考试错题
Route::delete('api/:version/analog/error/:false_id','api/:version.test/deleteError',[],['false_id'=>'\d+']);//删除考试错题
Route::get('api/:version/analog/log/:course/:car_status','api/:version.test/getLog',[],['course'=>'\d+','car_status'=>'\d+']);//用户考试记录
Route::get('api/:version/analog/log/max/:course/:car_status','api/:version.test/getUserMaxRecode',[],['course'=>'\d+','car_status'=>'\d+']);//获取用户最好成绩
Route::get('api/:version/analog/log/rank/:course/:car_status','api/:version.test/getUserRank',[],['course'=>'\d+','car_status'=>'\d+']);//获取用户排行
Route::get('api/:version/analog/video','api/:version.test/getVideoInfo');//安全视频


//表单提交:
Route::post('api/:version/Userform/form','api/:version.Userform/FromSubmission');//表单提交
Route::get('api/:version/Userform/appointment','api/:version.Userform/AppointmentUser');//预约报名用户

/*---------------- 微信开放平台相关路由 ----------------*/
Route::any('api/:version/mini/receive','api/:version.Mini/getSuite');//微信开放平台指令回调url
Route::any('api/:version/mini/callback/:appid','api/:version.Mini/getEventInfo');//接收事件回调url
Route::get('api/:version/mini/component','api/:version.Mini/getComponentAccessToken');//获取omponent_access_token
Route::get('api/:version/mini/pre_auth_code','api/:version.Mini/getPreAuthCode');//获取pre_auth_code
Route::get('api/:version/mini/get_auth_url','api/:version.Mini/getAuthUrl');//获取小程序讯录授权url
Route::post('api/:version/mini/get_data','api/:version.Mini/receiveUri');//获取授权回调信息
Route::get('api/:version/mini/get_access_token/:appid','api/:version.Mini/getAccessToken');//刷新access_token(测试)
Route::get('api/:version/mini/draft/list','api/:version.Mini/getDraftList');//获取小程序草稿列表
Route::get('api/:version/mini/template/list','api/:version.Mini/getTemplateList');//获取小程序模板列表
Route::post('api/:version/mini/template/add','api/:version.Mini/addTemplate');//设置小程序模板
Route::post('api/:version/mini/template/delete','api/:version.Mini/deleteTemplate');//设置小程序模板
Route::get('api/:version/mini/set_server_url','api/:version.Mini/setMiniUrl');//设置小程序服务器域名
Route::get('api/:version/mini/set_view_url','api/:version.Mini/setWebViewUrl');//设置小程序业务域名域名
Route::get('api/:version/mini/bind_member/:wechatId','api/:version.Mini/bindMember');//绑定小程序体验者
Route::get('api/:version/mini/un_bind_member/:wechatId','api/:version.Mini/unBindMember');//解绑小程序体验者
Route::get('api/:version/mini/list_member','api/:version.Mini/lsitMemeber');//列出所有小程序体验者
Route::post('api/:version/mini/code_submit','api/:version.Mini/codeSubmit');//提交小程序代码
Route::get('api/:version/mini/get_qrcode','api/:version.Mini/getQrcode');//获取体验二维码
Route::post('api/:version/mini/code_review','api/:version.Mini/submitReview');//提交代码审核
Route::get('api/:version/mini/get_audit/:auditid','api/:version.Mini/getLatestAudit');//获取指定版本代码的审核状态
Route::get('api/:version/mini/get_last_audit','api/:version.Mini/getAuditStatus');//获取最近一次提交的代码的审核状态
Route::get('api/:version/mini/unaudit','api/:version.Mini/unDocodeAudit');//撤回小程序代码审核
Route::get('api/:version/mini/release','api/:version.Mini/release');//发布已审核的小程序
Route::get('api/:version/template/:page','api/:version.Mini/getAllTemplate',[],['page'=>'\d+']);//获取模板消息库列表
Route::get('api/:version/template/detail/:id','api/:version.Mini/getTemplateDetail');//获取模板消息详情
Route::post('api/:version/template/add','api/:version.Mini/addWxopenTemplate');//添加模板消息
Route::get('api/:version/mini/unband','api/:version.Mini/unbundAuthor');//解绑小程序
/*------------------------ 企业微信相关路由 ----------------------*/
//新华扬CRM
Route::post('api/:version/ai/config','api/:version.Enterprise/getWxConfig');//获取js-sdk配置信息
Route::post('api/:version/enterprise/material/audio','api/:version.User/getMaterial');//获取语音素材接口
//行为相关接口
Route::post('api/:version/behavior/list','api/:version.Behavior/getBehaviorList');//获取行为列表
Route::post('api/:version/behavior/category','api/:version.Behavior/getBehaviorListByCategory');//根据分类获行为列表
Route::post('api/:version/behavior/user','api/:version.Behavior/getCustomById');//根据用户id获取行为
Route::post('api/:version/behavior/count','api/:version.Behavior/getBehaviorNum');//获取行为统计
Route::post('api/:version/behavior/custom','api/:version.Behavior/getCustoms');//获取客户列表
Route::post('api/:version/custom/behavior/:user_id','api/:version.Behavior/getCustomById');//根据用户id获取行为
Route::post('api/:version/statistics/rank','api/:version.Statistics/getRank');//获取排名信息
Route::post('api/:version/statistics/my','api/:version.Statistics/getMyRank');//获取我的排名信息
Route::post('api/:version/statistics/thumbsup','api/:version.Statistics/thumbsup');//用户点赞
Route::post('api/:version/statistics/thumbsup/list','api/:version.Statistics/getList');//点赞列表
Route::get('api/:version/statistics/log','api/:version.Statistics/insertLog');//插入排名信息
//聊天信息相关接口
Route::get('api/:version/message/user','api/:version.Message/getUser');//获取聊天用户
Route::post('api/:version/message/list','api/:version.Message/getMessageList');//获取聊天记录
Route::get('api/:version/message/user/status/:uid','api/:version.Message/changeMessageStatusByWorkUser',[],['uid'=>'\d+']);//聊天信息状态改变
Route::get('api/:version/message/user/delete/:uid','api/:version.Message/deleteUser',[],['uid'=>'\d+']);//删除聊天记录
Route::get('api/:version/user/info/:uid','api/:version.User/getUserInfoByUid',[],['uid'=>'\d+']);//获取用户信息
//通讯录相关接口
Route::post('api/:version/user/rate','api/:version.User/getRateNum');//获取用户成交率数量
Route::post('api/:version/user/list','api/:version.User/getUserList');//获取用户列表
Route::get('api/:version/user/:id','api/:version.User/getUserById');//请求用户信息
Route::get('api/:version/user/label/user/:uid','api/:version.User/getLabelByUser',[],['uid'=>'\d+']);//请求用户表标签
Route::post('api/:version/user/update','api/:version.User/updateUser');//更新用户信息
Route::post('api/:version/user/add_label','api/:version.User/addLabelByUser');//添加用户用户标签
Route::get('api/:version/user/label/list','api/:version.User/getLabelList');//获取标签列表
Route::get('api/:version/user/label/:id','api/:version.User/getUserByLabel',[],['id'=>'\d+']);//获取标签用户
Route::get('api/:version/user/label/delete/:id','api/:version.User/deleteLabel',[],['id'=>'\d+']);//删除标签
Route::post('api/:version/user/label/update','api/:version.User/updateLabel');//更新标签信息
Route::post('api/:version/user/label/add','api/:version.User/addLabel');//添加标签
Route::post('api/:version/follow/list','api/:version.User/getFollowData');//获取跟进记录
Route::post('api/:version/follow/data','api/:version.User/getFollowList');//获取跟进记录列表
Route::get('api/:version/behavior/data/:uid','api/:version.Behavior/getBehaviorData',[],['uid'=>'\d+']);//获取行为统计数组
Route::post('api/:version/behavior/active','api/:version.Behavior/getActiveData');//用户活跃度统计
Route::get('api/:version/behavior/interactive/:uid','api/:version.Behavior/getInteractionData',[],['uid'=>'\d+']);//用户交互数据统计
Route::post('api/:version/behavior/user','api/:version.Behavior/getBehaviorListByUser');//获取单个行为统计

//用户信息相关接口
Route::get('api/:version/enterprise/user','api/:version.User/getUserInfo');//获取新华扬CRM用户信息
Route::get('api/:version/enterprise/qrcode','api/:version.User/getQrCode');//获取新华扬CRM用户的二维码
Route::post('api/:version/enterprise/user/head','api/:version.User/updateImg');//更新用户头像信息
Route::get('api/:version/enterprise/base_info','api/:version.User/getBaseInfo');//获取新华扬CRM用户基本信息
Route::get('api/:version/enterprise/card_base_info','api/:version.User/getCardBaseInfo');//获取新华扬CRM名片基本信息
Route::post('api/:version/enterprise/update_card','api/:version.User/updateCardBaseInfo');//更新新华扬CRM名片基本信息

//推荐商品
Route::get('api/:version/enterprise/goods/category','api/:version.Category/getCategoryByUser');//商品分类
Route::get('api/:version/enterprise/goods/list/:id/:page','api/:version.Product/getProductByUser',[],['id'=>'\d+']);//商品列表
Route::get('api/:version/enterprise/goods','api/:version.User/getGoods');//获取推荐商品
Route::post('api/:version/enterprise/goods_add','api/:version.User/addGoods');//添加推荐商品

Route::get('api/:version/enterprise/extend','api/:version.User/getExtendInfo');//获取用户拓展信息
Route::post('api/:version/enterprise/extend/add','api/:version.User/addExtendInfo');//添加用户拓展信息
Route::get('api/:version/enterprise/video','api/:version.User/getVideoInfo');//获取视频信息

Route::get('api/:version/enterprise/share','api/:version.User/getShareWord');//获取分享语
Route::post('api/:version/enterprise/share/add','api/:version.User/updateShareWord');//更新分享语
Route::get('api/:version/enterprise/welcome','api/:version.User/getWelcomeWord');//获取欢迎
Route::post('api/:version/enterprise/welcome/add','api/:version.User/updateWelcomeWord');//更新欢迎语

Route::get('api/:version/workword/user/category','api/:version.Word/getWordCategoryByUser');//获取话术分类列表
Route::get('api/:version/workword/user/category/:categoryId','api/:version.Word/getWordByCategory',[],['categoryId'=>'\d+']);//更具分类获取话术列表
Route::post('api/:version/workword/user/add','api/:version.Word/addUserWord');//自定义话术添加
Route::get('api/:version/workword/user/word/:id','api/:version.Word/getWord',[],['id'=>'\d+']);//获取自定义话术
Route::post('api/:version/workword/user/update','api/:version.Word/updateUserWord');//更新自定义话术
Route::get('api/:version/workword/user/delete/:id','api/:version.Word/deleteUserWord',[],['id'=>'\d+']);//删除自定义话术
Route::get('api/:version/workword/user/list','api/:version.Word/geteUserWordList');//获取自定义话术列表

Route::get('api/:version/enterprise/coupon','api/:version.Coupon/getCouponListByTid');//获取驾校优惠卷
Route::get('api/:version/enterprise/coupon/list','api/:version.Coupon/getUserCouponList');//获取自己的优惠卷列表
Route::post('api/:version/enterprise/coupon/qrcode','api/:version.Coupon/getCouponQRCode');//获取分享码
Route::get('api/:version/enterprise/coupon/user/:c_id','api/:version.Coupon/getCouponUser',[],['c_id'=>'\d+']);//优惠卷获客详情
Route::get('api/:version/enterprise/coupon/detail/:c_id','api/:version.Coupon/getCouponDetailByUser',[],['c_id'=>'\d+']);//获取优惠卷详情
Route::post('api/:version/enterprise/coupon/add','api/:version.Coupon/addCouponByUser');//创建优惠卷
Route::post('api/:version/enterprise/coupon/up','api/:version.Coupon/batchUpdateCouponByUser');//优惠卷上下架

Route::get('api/:version/poster/recommend','api/:version.Poster/getRecommendPoster');//每日推荐海
Route::post('api/:version/poster/qrcode','api/:version.Poster/getQRCode');//二维码
Route::post('api/:version/poster/add','api/:version.Poster/addPoster');//添加海报
Route::get('api/:version/poster/category','api/:version.Poster/getPoster');//海报素材列表
Route::post('api/:version/poster/list','api/:version.Poster/getPosterByClass');//分类海报
Route::post('api/:version/poster/user','api/:version.Poster/getPosterList');//获取用户海报
Route::get('api/:version/poster/all','api/:version.Poster/getAllUser');//获取总用户
Route::get('api/:version/poster/userinfo/:id','api/:version.Poster/getUser',[],['id'=>'\d+']);//获取海报用户
//新华扬人事
Route::post('api/:version/boss/all','api/:version.User/getAllData');//获取所有统计信息
Route::post('api/:version/boss/rate','api/:version.User/getAllRateNum');//获取所有成交率
Route::get('api/:version/boss/order/:time','api/:version.Order/getAllOrders',[],['time'=>'\d+']);//获取订单统计信息
Route::get('api/:version/boss/follow/:time','api/:version.User/getAllFollowData',[],['time'=>'\d+']);//获取所有跟进信息
Route::get('api/:version/boss/add/:time','api/:version.User/getUserNum',[],['time'=>'\d+']);//新增用户
Route::get('api/:version/boss/behavior','api/:version.Behavior/getAllBehaviorData');//获取所有行为统计信息
Route::get('api/:version/boss/active/:time','api/:version.Behavior/getAllActiveData',[],['time'=>'\d+']);//获取所有活跃度统计信息
Route::get('api/:version/boss/interaction','api/:version.Behavior/getAllInteractionData');//获取总交互量统计

Route::post('api/:version/boss/condition','api/:version.User/getUserByCondition');//条件统计
Route::post('api/:version/boss/condition/rate','api/:version.User/getUserRateNum');//成交率统计
Route::get('api/:version/boss/user/:uid','api/:version.User/getUserData',[],['uid'=>'\d+']);//各项参数
/*---------------------- 企业微信第三方平台相关路由 ------------------------*/
Route::get('api/:version/work/notify','api/:version.Work/receiveNotify');//系统消息url
//联系人
Route::any('api/:version/work/contact','api/:version.Work/getSuite');//通讯录指令回调url
Route::post('api/:version/contact/pre_auth_code','api/:version.Work/getContactPreAuthCode');//获取通讯录预授权码
Route::post('api/:version/contact/set_config','api/:version.Work/setContactAppConfig');//设置通讯录配置
Route::post('api/:version/contact/permanent_code','api/:version.Work/getPermanentCode');//获取通讯录永久授权码
Route::get('api/:version/contact/get_auth_url','api/:version.Work/getContactAuthUrl');//获取通讯录授权url
Route::any('api/:version/contact/get_uri','api/:version.Work/receiveUri');//获取微信回调URI
//新华扬CRM
Route::any('api/:version/work/ai','api/:version.Enterprise/getAISuit');//新华扬CRM指令回调url
Route::any('api/:version/ai/callback/:CORPID','api/:version.Enterprise/getEventInfo');//接收事件和消息回调url
Route::get('api/:version/ai/pre_auth_code','api/:version.Enterprise/getPreAuthCode');//获取新华扬CRM预授权码
Route::get('api/:version/ai/set_config','api/:version.Enterprise/setAppConfig');//设置授权配置
Route::post('api/:version/ai/permanent_code','api/:version.Enterprise/getPermanentCode');//获取新华扬CRM永久授权码
Route::get('api/:version/ai/get_auth_url','api/:version.Enterprise/getAIAuthUrl');//获取新华扬CRM授权url
Route::any('api/:version/ai/get_uri','api/:version.Enterprise/receiveUri');//获取微信回调URI
//新华扬人事
Route::any('api/:version/work/boss','api/:version.Boss/getBossSuit');//新华扬人事指令回调url
Route::any('api/:version/boss/callback/:CORPID','api/:version.Boss/getEventInfo');//接收事件和消息回调url
Route::get('api/:version/boss/pre_auth_code','api/:version.Boss/getPreAuthCode');//获取新华扬人事预授权码
Route::get('api/:version/boss/set_config','api/:version.Boss/setAppConfig');//设置授权配置
Route::post('api/:version/boss/permanent_code','api/:version.Boss/getPermanentCode');//获取新华扬人事永久授权码
Route::get('api/:version/boss/get_auth_url','api/:version.Boss/getBossAuthUrl');//获取新华扬CRM授权url
Route::any('api/:version/boss/get_uri','api/:version.Boss/receiveUri');//获取微信回调URI
/*----------------- cms管理相关API ------------------*/
Route::get('api/:version/thirdapp/info','api/:version.ThirdApp/getThirdAppInfo');//账号信息
Route::get('api/:version/thirdapp/auth_info','api/:version.ThirdApp/getUserInfo');//获取用户授权信息
Route::get('api/:version/thirdapp/update','api/:version.ThirdApp/getUserInfo');//用户授权信息
Route::post('api/:version/thirdapp/password','api/:version.ThirdApp/changePassword');//修改用户密码
//首页信息统计
Route::get('api/:version/thirdapp/workuser','api/:version.ThirdApp/getWorkUserInfo');//获取名片信息状态
Route::get('api/:version/thirdapp/status','api/:version.ThirdApp/getAccountStatus');//账号状态
Route::get('api/:version/thirdapp/users','api/:version.ThirdApp/getUserNum');//用户个数统计
Route::post('api/:version/thirdapp/all','api/:version.ThirdApp/getCountInfo');//获取所有统计信息
Route::post('api/:version/thirdapp/browse','api/:version.ThirdApp/getCountInfoByTime');//根据时间获取行为统计
//部门管理
Route::get('api/:version/department/list','api/:version.Department/getDepartmentList');//获取部门列表
Route::post('api/:version/department/add','api/:version.Department/addDepartment');//添加部门列表
Route::post('api/:version/department/update','api/:version.Department/updateDepartment');//更新部门
Route::get('api/:version/department/delete/:d_id','api/:version.Department/deleteDepartment',[],['d_id'=>'\d+']);//删除部门
//成员管理
Route::get('api/:version/member/user/:userId','api/:version.Member/getMemberByID');//获取成员详情
Route::post('api/:version/member/image/:wu_id','api/:version.Member/updateUserImg',[],['wu_id'=>'\d+']);//更新成员头像信息
Route::get('api/:version/member/list','api/:version.Member/getMemberList');//获取全部成员
Route::get('api/:version/member/list/:d_id','api/:version.Member/getDepartmentUser',[],['id'=>'\d+']);//获取部门成员
Route::post('api/:version/member/add','api/:version.Member/addMember');//创建部门成员
Route::post('api/:version/member/update','api/:version.Member/updateMember');//更新部门成员
//Route::post('api/:version/member/department/:userId','api/:version.Member/updateUserDepartment');//更新成员部门信息
Route::post('api/:version/member/delete','api/:version.Member/deleteMember');//删除部门成员
Route::get('api/:version/member/sync','api/:version.Member/syncUser');//同步操作
Route::post('api/:version/member/authorize','api/:version.Member/memberAuthorize');//名片授权
Route::get('api/:version/member/status','api/:version.Member/authorizeStatus');//名片授权状态
Route::post('api/:version/member/batch/on','api/:version.Member/batchAuthorize');//批量开启名片授权
Route::post('api/:version/member/batch/off','api/:version.Member/batchCancelAuthorize');//批量取消名片授权
Route::get('api/:version/member/qrcode/:w_id','api/:version.Card/getQRCodeByWuId',[],['w_id'=>'\d+']);//获取用户二维码
Route::post('api/:version/member/handover','api/:version.Member/handoverUser');//用户交接
Route::post('api/:version/member/number/:id','api/:version.Member/getCustomerNum',[],['id'=>'\d+']);//获取交接用户数量
Route::post('api/:version/member/result','api/:version.Member/getCustomerResult');//获取交接用户计算结果
//话术管理
Route::post('api/:version/workword/add_class','api/:version.Word/addClassify');//添加话术分类
Route::get('api/:version/workword/delete_class/:id','api/:version.Word/deleteClassify',[],['id'=>'\d+']);//删除分类
Route::post('api/:version/workword/update_class','api/:version.Word/updateClassify');//更新分类
Route::get('api/:version/workword/get_class','api/:version.Word/getClassify');//获取分类列表
Route::get('api/:version/workword/class_user','api/:version.Word/getClassifyByUid');//根据用户ID获取分类
Route::get('api/:version/workword/get/:id','api/:version.Word/getWord',[],['id'=>'\d+']);//获取话术
Route::post('api/:version/workword/add','api/:version.Word/addWord');//添加话术
Route::post('api/:version/workword/update','api/:version.Word/updateWord');//更新话术
Route::get('api/:version/workword/delete/:id','api/:version.Word/deleteWord',[],['id'=>'\d+']);//删除话术
Route::get('api/:version/workword/list/:c_id','api/:version.Word/getWordList',[],['c_id'=>'\d+']);//获取话术列表
//商城管理
Route::get('api/:version/Mall/info','api/:version.Mall/getMallInfo');//上传设置信息
Route::post('api/:version/Mall/update','api/:version.Mall/updateMall');//商城设置
Route::get('api/:version/category','api/:version.Category/getCategoryByManager');//获取商品分类
Route::get('api/:version/category/:id','api/:version.Category/getCategory',[],['id'=>'\d+']);//获取单个分类
Route::post('api/:version/category/create','api/:version.Category/createCategory');//创建分类
Route::post('api/:version/category/update','api/:version.Category/updateCategory');//更新分类
Route::get('api/:version/category/delete/:id','api/:version.Category/deleteCategory');//删除分类
Route::get('api/:version/property','api/:version.Category/getProperty');//获取分类的规格信息
Route::get('api/:version/property/:id','api/:version.Category/getPropertyByCategory',[],['id'=>'\d+']);//获取某个分类下的规格信息
Route::post('api/:version/property/create/:id','api/:version.Property/createProperty',[],['id'=>'\d+']);//创建商品规格
Route::post('api/:version/product/list','api/:version.Product/getProductList');//商品列表
Route::get('api/:version/product/list/:goods_id','api/:version.Product/getProduct');//获取商品详情
Route::post('api/:version/product/create','api/:version.Product/createProduct');//创建商品
Route::post('api/:version/product/update','api/:version.Product/updateProduct');//更新商品
Route::get('api/:version/product/delete/:id','api/:version.Product/deleteProduct');//删除商品
Route::post('api/:version/product/remove','api/:version.Product/removeProduct');//移动商品
Route::post('api/:version/product/status','api/:version.Product/batchUPOrDown');//批量上下架商品
Route::post('api/:version/product/delete_img','api/:version.Product/deleteImg');//删除图片

Route::post('api/:version/order/manager','api/:version.Order/getSummary');//获取总订单订单
Route::put('api/:version/order/delivery','api/:version.Order/delivery');//订单发货
Route::post('api/:version/order/search','api/:version.Order/searchOrder');//搜索订单

Route::post('api/:version/coupon','api/:version.Coupon/getCouponList');//优惠券列表
Route::get('api/:version/coupon/:id','api/:version.Coupon/getCouponById',[],['id'=>'\d+']);//获取优惠券详情
Route::post('api/:version/coupon/add','api/:version.Coupon/addCoupon');//添加优惠卷
Route::post('api/:version/coupon/update','api/:version.Coupon/updateCoupon');//更新优惠券
Route::get('api/:version/coupon/delete/:id','api/:version.Coupon/deleteCoupon',[],['id'=>'\d+']);//删除优惠卷
Route::post('api/:version/coupon/batchUpAndDown','api/:version.Coupon/batchUpdateCoupon');//批量上下架

Route::post('api/:version/distribute/config','api/:version.Distribute/insertData');//添加分销配置信息

//授权管理
Route::get('api/:version/mini/info','api/:version.ThirdApp/getMiniDetail');//获取小程序授权详情
Route::get('api/:version/work/info','api/:version.ThirdApp/getWorkDetail');//企业微信授权状态
//小程序信息管理
Route::get('api/:version/app/web','api/:version.ThirdApp/getWebInfo');//获取官网信息
Route::post('api/:version/app/update','api/:version.ThirdApp/updateWebInfo');//更新官网信息
//账号管理
Route::get('api/:version/app/user/info','api/:version.ThirdApp/getThirdAppInfo');//获取个人信息
Route::post('api/:version/app/user/update','api/:version.ThirdApp/updateThirdAppInfo');//更新个人信息

